@import 'src/styles/constants';

@mixin button() {
  button {
    box-shadow: none;
    outline: 0;
    border: 0;
    min-width: 180px;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: $text40;
    font-weight: 500;
    background-color: $white;
    color: $black;
    border: 1px solid $black;
    cursor: pointer;
    transition: 0.2s all;

    &:hover {
      background-color: $black;
      color: $white;
    }

    &.dark {
      background-color: $black;
      color: $white;

      &:hover {
        background-color: $dark10;
      }
    }
  }
}

.main-page {
  @include button();
  width: 100%;
  display: flex;
  flex-direction: column;
  margin: auto;
  align-items: center;
  padding: 0 20px;

  .main-section {
    position: relative;
    background: $primary;
    width: 100%;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;

    .description {
      font-size: $text10;
      color: $white;
    }

    .qr {
      position: absolute;
      top: 20px;
      right: 20px;
      text-align: center;

      img {
        display: block;
        border-radius: 4px;
      }

      &:after {
        content: 'Try our new Expo App!';
        position: absolute;
        top: 20px;
        right: calc(100% + 10px);
        background-color: $white;
        min-width: 120px;
        padding: 3px;
        border-radius: 2px;
        box-shadow: -1px 1px 2px $dark60;
      }

      &:before {
        content: '';
        position: absolute;
        right: 100%;
        top: 30px;
        border: 5px solid transparent;
        border-left-color: $dark80;
      }

      > a {
        display: inline-block;
        background-color: $white;
        text-decoration: none;
        font-size: large;
        margin-top: 12px;
        width: 170px;
        padding: 4px 8px;
        border-radius: 2px;
        box-shadow: -1px 1px 2px $dark60;
        &:hover {
          background-color: $violet70;
        }
      }
    }
  }

  .platforms-section {
    background: $dark80;
    color: $dark10;
    width: 100%;
    margin-top: 20px;
    display: flex;
    padding: 40px 0;

    > div:first-child {
      display: flex;
      flex: 1;
      height: 100%;
      background: $dark80;
      padding: 20px 10px;
      justify-content: space-evenly;
      align-items: center;
    }

    > div:nth-child(2) {
      width: 40%;
      border-right: 1px solid $white;
      padding: 40px;
    }
  }

  .toolset-section {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px;
    background: $violet20;
    color: $white;

    .code-examples {
      display: flex;
      align-items: flex-start;

      code {
        display: inline-block;
        white-space: break-spaces;
        text-align: left;
        background: $dark10;
        padding: 10px;
        margin-right: 10px;
        font-size: $text40;
        line-height: 1.4;
      }
    }
  }

  .components-section {
    padding: 40px;
    text-align: center;
    background-color: $dark80;
    margin-top: 20px;

    > .image-examples {
      display: flex;
      justify-content: space-evenly;

      img {
        height: 500px;
      }
    }
  }

  .logo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    // position: absolute;
    // top: 50%;
    // left: 50%;
    // transform: translate(-50%, -50%);
    text-align: center;

    .logo {
      height: 400px;
    }

    .docs-button {
      background: $secondary;
      color: $dark10;
      display: inline-block;
      margin-top: -30px;
      padding: 10px 25px;
      border-radius: 2px;
      font-size: $text10;
      letter-spacing: 3px;
      box-shadow: 3px 3px 1px 1px $dark60;
      cursor: pointer;
      transition: all 0.2s;

      &:hover {
        background: $white;
      }

      &:active {
        box-shadow: 1px 1px 0px 0px $dark60;
      }
    }
  }
}
